close all;

row = 2;

figure;
plot(out{row,1}.rankin, '--', 'linewidth', 2);
hold on;
plot(out{row,1}.rankout, ':', 'linewidth', 2);

x = length(out{row,1}.rankout);
y = max(out{row,1}.rankin) + 2;
axis([0,x,0,y]);
xlabel('iteration');
ylabel('rank');
legend({'Rank of Q','Rank of Z'},'FontSize',12);
title('CAP');

figure;
plot(out{row,2}.rankin, '--', 'linewidth', 2);
hold on;
plot(out{row,2}.rankout, ':', 'linewidth', 2);

x = length(out{row,2}.rankout);
y = max(out{row,2}.rankin) + 2;
axis([0,x,0,y]);
xlabel('iteration');
ylabel('rank');
legend({'Rank of Q','Rank of Z'},'FontSize',12);
title('LSP');

figure;
plot(out{row,3}.rankin, '--', 'linewidth', 2);
hold on;
plot(out{row,3}.rankout, ':', 'linewidth', 2);

x = length(out{row,3}.rankout);
y = max(out{row,3}.rankin) + 2;
axis([0,x,0,y]);
xlabel('iteration');
ylabel('rank');
legend({'Rank of Q','Rank of Z'},'FontSize',12);
title('TNN');